package service;

import Util.SqlSessionUtil;
import dao.NingboGDPMapper;
import domain.NingboGDP;
import org.apache.ibatis.session.SqlSession;

public class NingBoGDPService {
    public NingboGDP selectDataByCounty(String county){
        SqlSession session = SqlSessionUtil.getSession().openSession();;
        NingboGDPMapper userOperation = session
                .getMapper(NingboGDPMapper.class);
        NingboGDP nbGDP = userOperation.selectByCounty(county);
        session.commit();
        session.close();
        return nbGDP;
    }

    public static void main(String[] args) {
        NingBoGDPService n = new NingBoGDPService();
        n.selectDataByCounty("海曙");
    }

}
